#!/bin/bash
\cp env_file .env
sed -i "s/\(HOST_IP=\).*/\1`ifconfig eth0 | grep inet | xargs | cut -d ' ' -f2`/g" .env
START_DIR=$(cd "$(dirname $0)"; pwd)
##docker start
cd ${START_DIR}
#docker run -i --rm -v "$PWD/protected":/usr/src/app -w /usr/src/app yunlian/php:7.1-composer composer install
#chown -R www-data. ${START_DIR}
docker-compose down&& docker-compose up -d
